require 'sketchup.rb'
module AMTF
class AF
  def self.get_dir
    p "hello AF!"
    file = __FILE__.dup
    file.force_encoding("UTF-8")
    if file.respond_to?(:force_encoding)
      f = File.basename(file, '.*').freeze
      p "File.basename="+f
      r = File.dirname(file).freeze+"/组件模板"
      p "File.dirname="+r
      return r
      # p "File.join(r,f)="+File.join(r,f)
      # return File.join(r,f)
    end
  end
  def self.设置常用对象
    @model = Sketchup.active_model
    @@entities = @model.active_entities
    @selection = @model.selection
  end
  def 设置常用对象
    @model = Sketchup.active_model
    @entities = @model.active_entities
    @selection = @model.selection
  end


end
end
